package org.nico.cb.service.impl;

import java.util.List;
import java.util.Map;

import org.nico.aoc.scan.annotations.Label;
import org.nico.aoc.scan.annotations.Service;
import org.nico.cb.dao.ArticleDao;
import org.nico.cb.domain.article.Article;
import org.nico.cb.service.ArticleService;
import org.nico.db.page.DBPage;

/** 
 *
 * 
 * @author nico
 * @version createTime：2018年4月15日 上午12:40:18
 */
@Service
public class ArticleServiceImpl implements ArticleService{

	@Label
	private ArticleDao articleDao;

	@Override
	public Article get(Object id) {
		return articleDao.get(id);
	}

	@Override
	public List<Article> get(Map<String, Object> criterias, DBPage page) {
		return articleDao.get(criterias, page);
	}

	@Override
	public long update(Article entity) {
		return articleDao.update(entity);
	}

	@Override
	public Article insert(Article entity) {
		return articleDao.insert(entity);
	}

	@Override
	public boolean delete(Article entity) {
		return articleDao.delete(entity);
	}

	@Override
	public boolean deleteById(Object id) {
		return articleDao.deleteById(id);
	}

	@Override
	public long count(Map<String, Object> criterias) {
		return articleDao.count(criterias);
	}

}
